Skip to content

feature: Respect the file information for languages from the API CF-1742#164

Merged
machadoit merged 8 commits intomainfrom
consider-files-CF-1742
Jul 10, 2025
Merged

feature: Respect the file information for languages from the API CF-1742#164
machadoit merged 8 commits intomainfrom
consider-files-CF-1742

Conversation

@machadoit
Copy link
Copy Markdown
Contributor

@machadoit machadoit commented Jul 9, 2025

  • Add a setting per tool for tools that should rely on the files information. With that setting build the languages-config.yaml correctly (otherwise, tools like pylint will invoke the requirements.txt and fail)

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Jul 9, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.29% 60.29%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d5b5ef2) 5616 1069 19.03%
Head commit (3aa5761) 5665 (+49) 1095 (+26) 19.33% (+0.29%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#164) 68 41 60.29%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

machadoit added 2 commits July 9, 2025 19:01
Trivy should check and report on requirements.txt (done)
Pylint should ignore the requirements.txt (not done yet)

When the CLI is fixed to generate the correct files for pylint
(not having the requirements.txt file), the langauges-config.yaml
should be regenerated in order to fix the test
@machadoit machadoit force-pushed the consider-files-CF-1742 branch from be8544c to 3ff97a7 Compare July 9, 2025 17:28
Comment thread plugins/tools/trivy/plugin.yaml Outdated
name: trivy
description: Trivy is a comprehensive security scanner for containers and other artifacts.
default_version: 0.59.1
support_specific_files: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be cool to also have it in API, but for now 👌 of course

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I guess that is fair, let's aim this for now to have something simple. Also, I think this it not working that well. We might as well just add it on the code or something simpler and later discuss where we want to add it and how. Maybe each tool can clarify what items it consider extra extensions?

Copy link
Copy Markdown
Contributor

@andrzej-janczak andrzej-janczak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Tested locally both local and remote mode, works ok.

However discover is not working with this:

go run cli-v2.go config discover requirements.txt
Discovering languages and tools for path: requirements.txt
No relevant tools found for the file extensions in the provided path.

But it can be fixed later

@machadoit machadoit force-pushed the consider-files-CF-1742 branch from 845cd52 to c91d49b Compare July 10, 2025 09:56
@machadoit machadoit enabled auto-merge (squash) July 10, 2025 10:09
@machadoit machadoit merged commit 1b80ceb into main Jul 10, 2025
10 checks passed
@machadoit machadoit deleted the consider-files-CF-1742 branch July 10, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants